Jetfire Wiki
Jazz CMS
Debug
Jetfire Core
Jetfire Language
Jetfire Web Part
Library
Release Notes
Roles
States
Web Service
Workflow Administration
Quick Search
»
Advanced Search »
Back
Example Code
Modified on 2010/12/28 18:39
by
John
Categorized as
Jetfire Core
==Example Code - Unit Tests== The [http://jetfire.codeplex.com/releases|Jetfire download] contains example code contained in two projects, <b>JetfireCoreExampleTests </b> and [Jetfire Code Library|JetfireCode]. The core examples (project:JetfireCoreExampleTests) demonstrate use of the Jetfire code through documented unit tests. {TOC} ===Project 'JetfireCoreExampleTests' Directories=== The following directories are contained in the 'JetfireCoreExampleTests' project in the 'ExampleCode' directory. * CLR - Contains example tests on using CLR code within Jetfire. * DBQuery - Demonstrates how to search for Jetfire objects using a database query. * DLR - Contains example of working with Jetfire objects (DLR) within a .net C# program. * Dynamic Access Modifier Tests * General Applications * Specific Contructs * System Library * Void Safety ===Application Examples=== ====Hello World Unit Test==== Hello world unit test demonstrates [persistence] of Jetfire objects with this variant of the classical [http://en.wikipedia.org/wiki/Hello_world_program|'Hello World'] program. See [Jetfire Overview#hello world|Hello World description] for a detailed explanation. ====DVD Library Example Unit Test==== This example demonstrates how Jetfire can be used to create a DVD library using the '[states|state]' first class construct. The 'state' construct prevents methods, in this example, from being executed when the workflow is not in the proper state. For example the 'Borrow' method can not be executed when the workflow is in the 'Borrowed' state. There is just one Jetfire workflow class, called 'DVD' required for the solution. Individual DVDs can be borrowed and returned using the 'Borrow' and 'Return' methods. The status of each individual DVD is determined by the state, 'CheckedIn' or 'Borrowed'. See [Jetfire Overview#DVD Library Example|DVD Library Example description] for a detailed explanation. ===='ToDo' List Unit Test==== The ToDo Workflows consist of: * ToDoItem: something that is to be done by a user * ToDoList: a list of ToDoItems. (It also has a Subject and ToolTip.) Notes * The ToDoList is a nicety that provides a mechanism for grouping ToDoItems. * At the GUI, the user can access the ToDoList, track the status of individual ToDoItems. * ToDoItem states: Started, Scheduled, Cancelled, Completed. * ToDoList states: Started, Locked, Completed. * Anyone can change anything in a Started object. * Once the ToDoList is 'Locked', only the Owner (the logged user who created the object) can change properties in the ToDo List. * Once the ToDoItem is 'Scheduled', only the Owner (the logged user who created the object) can change properties in the ToDo Item. * Note the use of an access property to track who and when properties can be set and methods can be executed. ===See Also=== * [Jetfire Overview] * [First Class Constructs]
Meta Keywords:
Meta Description:
Change Comment:
ScrewTurn Wiki
version 3.0.4.560. Some of the icons created by
FamFamFam
.